<?php
    header('content-type:text/html;charset=utf-8');
    
    //如果没有传$_POST['week'] 就给$a赋值1 
    //如果传了, 就用传过来的值
    $a = empty($_POST['week']) ? '1' : $_POST['week'];
    
    switch($a){
        case 1:
        case 2:
        case 3:
        case 4:
        case 5:$name='work.jpg'; break;
        case 6:
        case 7:$name='relax.jpg'; break;
        default:
          echo '没有这天'; 
    }

    echo "<img src='./images/{$name}' />";


?>